import request from '@/utils/request'

// 查询病害处治列表
export function listTreatment(query) {
  return request({
    url: '/biz/treatment/list',
    method: 'get',
    params: query
  })
}

// 查询病害处治详细
export function getTreatment(tTreatmentId) {
  return request({
    url: '/biz/treatment/' + tTreatmentId,
    method: 'get'
  })
}

// 新增病害处治
export function addTreatment(data) {
  return request({
    url: '/biz/treatment',
    method: 'post',
    data: data
  })
}

// 修改病害处治
export function updateTreatment(data) {
  return request({
    url: '/biz/treatment',
    method: 'put',
    data: data
  })
}

// 删除病害处治
export function delTreatment(tTreatmentId) {
  return request({
    url: '/biz/treatment/' + tTreatmentId,
    method: 'delete'
  })
}

// 导出养护方案计划
export function exportTreatment(query) {
  return request({
    url: '/biz/treatment/export',
    method: 'get',
    params: query
  })
}
